<?
interface itest{
	public function testit($obj);
}

class test implements itest{
  function __construct($nm){
    $this->nm=$nm;
  }
	public function testit($obj){
	}
	static function a($i){
	  return $i*2;
	}
}
class not_test{
  function __construct($nm){
    $this->nm=$nm;
  }
}


class test1{
	function __construct(itest $obj){
		$this->obj=$obj;
		$this->obj->nm.='_sub';
	}
}

//echo test::a(5).'<br>';

$t1=new test('john');       // S_OK!!!
//$t1=new not_test('john'); -- WRONG!!!
$t2=new test1($t1);

echo $t1->nm.'<br>';
echo $t2->obj->nm;

?>
